package com.ysqcould.activity.service.impl;

import java.util.List;

import com.ysqcould.activity.domain.vo.ReproduceVo;
import com.ysqcould.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ysqcould.activity.mapper.ActivityReproduceMapper;
import com.ysqcould.activity.domain.ActivityReproduce;
import com.ysqcould.activity.service.IActivityReproduceService;

/**
 * 活动转载记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-12
 */
@Service
public class ActivityReproduceServiceImpl implements IActivityReproduceService 
{
    @Autowired
    private ActivityReproduceMapper activityReproduceMapper;

    /**
     * 查询活动转载记录
     * 
     * @param id 活动转载记录主键
     * @return 活动转载记录
     */
    @Override
    public ActivityReproduce selectActivityReproduceById(Long id)
    {
        return activityReproduceMapper.selectActivityReproduceById(id);
    }

    /**
     * 查询活动转载记录列表
     * 
     * @param activityReproduce 活动转载记录
     * @return 活动转载记录
     */
    @Override
    public List<ReproduceVo> selectActivityReproduceList(ActivityReproduce activityReproduce)
    {
        return activityReproduceMapper.selectActivityReproduceList(activityReproduce);
    }

    /**
     * 新增活动转载记录
     * 
     * @param activityReproduce 活动转载记录
     * @return 结果
     */
    @Override
    public int insertActivityReproduce(ActivityReproduce activityReproduce)
    {
        activityReproduce.setCreateTime(DateUtils.getNowDate());
        return activityReproduceMapper.insertActivityReproduce(activityReproduce);
    }

    /**
     * 修改活动转载记录
     * 
     * @param activityReproduce 活动转载记录
     * @return 结果
     */
    @Override
    public int updateActivityReproduce(ActivityReproduce activityReproduce)
    {
        activityReproduce.setUpdateTime(DateUtils.getNowDate());
        return activityReproduceMapper.updateActivityReproduce(activityReproduce);
    }

    /**
     * 批量删除活动转载记录
     * 
     * @param ids 需要删除的活动转载记录主键
     * @return 结果
     */
    @Override
    public int deleteActivityReproduceByIds(Long[] ids)
    {
        return activityReproduceMapper.deleteActivityReproduceByIds(ids);
    }

    /**
     * 删除活动转载记录信息
     * 
     * @param id 活动转载记录主键
     * @return 结果
     */
    @Override
    public int deleteActivityReproduceById(Long id)
    {
        return activityReproduceMapper.deleteActivityReproduceById(id);
    }
}
